<?php
namespace Home\Controller;
use \Home\Controller\BaseController;
use \Home\Controller\PostController;
class IndexController extends BaseController {
    
    /*
    company_info;
     */
    public function index()
    {
        $list = C('company');
        print_r($list);
    }
    public function company()
    {    
        $data = $this->params;
        $list = empty($data)?C('company'):$data;
        $baseinfo = "baseInfoCompany";
        $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/company');
        $this->_responseData($res);
    }//ok
    /*
    operation公司营运规模
     */
    public function operation()
    {
        $data = $this->params;
        $list = empty($data)?C('operation'):$data;
        $baseinfo = "baseInfoCompanyStat";
        $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/companystat');
        $this->_responseData($res);
    }//ok
    /*
    公司支付信息接口 payinfo
     */
    public function payinfo()
    {
        $data = $this->params;
        $list = empty($data)?C('payinfo'):$data;
        // $list = array(
        //         ['CompanyId'=>C('CompanyId'),
        //         'PayName'=>'支付宝（中国）网络技术有限公司',
        //         'PayId'=>'支付机构支付 业务许可证编号',
        //         'PayType'=>'支付业务类型',
        //         'PayScope'=>'业务覆盖范围',
        //         'PrepareBank'=>'备付金存管银行',
        //         'CountDate'=>'7',
        //         'State'=>0,
        //         'Flag'=>1,
        //         'UpdateTime'=>date('Y-m-d H:i:s')   
        //         ],
        //         ['CompanyId'=>C('CompanyId'),
        //         'PayName'=>'深圳市腾讯计算机系统有限公司',
        //         'PayId'=>'支付机构支付 业务许可证编号',
        //         'PayType'=>'支付业务类型',
        //         'PayScope'=>'业务覆盖范围',
        //         'PrepareBank'=>'备付金存管银行',
        //         'CountDate'=>'7',
        //         'State'=>0,
        //         'Flag'=>1,
        //         'UpdateTime'=>date('Y-m-d H:i:s')   
        //         ]

        //         );
         $baseinfo = "baseInfoCompanyPay";
         $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/companypay');
         $this->_responseData($res);
    }//ok
     
         /*
         公司服务机构
          */    
        public function service()
        {
            $data = $this->params;
            $list = empty($data)?C('service'):$data;
            // $list = array(
            // 'CompanyId'=>C('CompanyId'),
            // 'Address'=>'655414',
            // 'ServiceName'=>'服务机构名称',
            // 'ServiceNo'=>'服务机构代码',
            // 'DetailAddress'=>'服务机构地址',
            // 'ResponsibleName'=>'李秀君',
            // 'ResponsiblePhone'=>'18213718760',
            // 'ManagerName'=>'服务机构管理人姓名',
            // 'ManagerPhone'=>'管理人联系电话',
            // 'ContactPhone'=>'服务机构紧急联系电 话',
            // 'MailAddress'=>'行政文书送达邮寄地 址',
            // 'CreateDate'=>date('Y-m-d','2017-01-01'),
            // 'State'=>0,//0:有效1:失效
            // 'Flag'=>1,
            // 'UpdateTime'=>date('Y-m-d H:i:s')   
            // );
        $baseinfo = "baseInfoCompanyService";
        $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/companyservice');
        $this->_responseData($res);

         }//ok
         /*
         公司经菅许
          */
        public function companyPermit()
        {
            $data = $this->params;
            $list = empty($data)?C('companypermit'):$data;
            // $list = array(
            // 'CompanyId'=>C('CompanyId'),
            // 'Address'=>'655414',
            // 'Certificate'=>'网络预约出租汽车经 营许可证号',
            // 'OperationArea'=>'经营区域',
            // 'OwnerName'=>'公司名称',
            // 'Organization'=>'发证机构名称',
            // 'StartDate'=>date('Y-m-d',$startime),
            // 'StopDate'=>date('Y-m-d',$endtime),
            // 'State'=>'证照状态',//见 JT/T 415—2006 中 5.5.2
            // 'Flag'=>1,
            // 'UpdateTime'=>date('Y-m-d H:i:s')   
            // );
         $baseinfo = "baseInfoCompanyPermit";
         $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/companypermit');
         $this->_responseData($res);
        }//ok
        /*
        运价信息
         */
        public function companyfare()
        {
            $data = $this->params;
            $list = empty($data)?C('companyfare'):$data;
            
            //$list = array(
            // 'CompanyId'=>C('CompanyId'),
            // 'Address'=>'655414',
            // 'FareType'=>'jlsfare201711039',//由网约车平台公司统一 编码，应确保唯一性
            // 'FareTypeNote'=>'运价类型说明',
            // 'FareValidOn'=>date('Y-m-d',$startime),
            // 'FareValidOff'=>date('Y-m-d',$endtime),
            // 'StartFare'=>20,
            // 'StartMile'=>'起步里程',
            // 'UnitPricePerMile'=>'计程单价(按公里)',
            // 'UnitPricePerMinute'=>'计时单价(按分钟',
            // 'UpPrice'=>'单程加价单价',
            // 'UpPriceStartMile'=>'单程加价公里',
            // 'MorningPeakTimeOn'=>'08:00',
            // 'MomingPeakTimeOff'=>'10:00',
            // 'EveningPeakTimeOn'=>'17:00',
            // 'EveningPeakTimeOff'=>'20:00',
            // 'OtherPeakTimeOn'=>'12:00',
            // 'OtherPeakTimeOff'=>'14:00',
            // 'PeakUnitPrice'=>'髙峰时间单程加价单 价',
            
            // 'Flag'=>1,
            // 'UpdateTime'=>date('Y-m-d H:i:s')   
            //);
            $list = check_type_float($list);
        $baseinfo ='baseInfoCompanyFare';
        $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/companypermit');
         $this->_responseData($res);
        }//
        /*
        车辆基本信息
         */
        public function vehicle()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                // CompanyId, Address, VehicleNo, PlateColor, Seats, Brand, Model, VehicleType, OwnerName, VehicleColor, EngineId, VIN, CertifyDateA, FuelType, EngineDisplace, TransAgency, TransArea, TransDateStart, TransDateStop, CertifyDateB, FixState, CheckState, FeePrintId, GPSBrand, GPSModel, GPSInstallDate, RegisterDate, CommercialType, FareType, State, Flag, UpdateTime
                'CompanyId'=>C('companyId'),
                'Address'=>'500000',
                'VehicleNo'=>'川SR8889',
                'PlateColor'=>'黑色',//见 JT/T 697. 7—2014 中5. 6
                'Seats'=>4,
                'Brand'=>'宝马',
                'Model'=>'宝马X5',
                'VehicleType'=>'宝马X5',
                'OwnerName'=>'李秀君',
                'VehicleColor'=>'黑色',//
                'EngineId'=>'697215',
                'CertifyDateA'=>date('Ymd'),
                'VIN'=>'11111111111111113',
                'FuelType'=>'汽油',//见 JT/T697. 7—2014 中 4.1.4.15
                'EngineDisplace'=>'1500',
                'PhotoId'=>'0002',//null
                'Certificate'=>'182923123121',//null,见：JT/T 415—2006 中5. 4.1，地市字别可包含三个汉字
                'TransAgency'=>'重庆市交通管理局',//'车辆运输证发证机构',
                'TransArea'=>'重庆和四川',
                'TransDateStart'=>date('Ymd'),//YYYYMMDD
                'TransDateStop'=>date('Ymd'),//'车辆运输证有效期止',
                'CertifyDateB'=>date('Ymd'),//'车辆初次登记日期',
                'FixState'=>'0',
                'NextFixDate'=>date('Ymd'),//'车辆下次年检时间',//null
                'CheckState'=>'01',//见 JT/T 415—2006 中 5.4.4,0:未年审；1：年审合格；2：年审不合格
                'FeePrintId'=>'908w9wjdsab',
                'GPSBrand'=>'GPS卫星定位系统',
                'GPSModel'=>'GPS-1.32',
                'GPSIMEI'=>'gps-9www33a',//null
                'GPSInstallDate'=>(int)date('Ymd'),//'卫星定位设备安装日 期',
                'RegisterDate'=>(int)date('Ymd'),//'车辆信息向服务所在地出 租汽车行政主管部门报备 日期',
                'CommercialType'=>1,//1:网络预约出租汽车2:巡游出租汽车3:私人小客车合乘
                'FareType'=>'2017112206201230',//由网约车公司定义，与A.4.6运价信息接口 一一对 应
                'State'=>1,//'状态',
                'Flag'=>1,//'操作标识',
                'UpdateTime'=>date('YmdHis')
                );
        $list = check_type_float($list);
        $baseinfo = 'baseInfoVehicle';
        $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/vehicle');
        $this->_responseData($res);
        }//ok||||--------------------------------等待--------------------------------------------
        /*
        车辆保险信息
         */
        public function vehicleinsurance()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                'CompanyId'=>C('companyId'),
                'VehicleNo'=>'川SR8889',
                'InsurCom'=>'阳光保险股份有限公司',
                'InsurNum'=>'B8ADD82D7E2644EE874C171019172126',
                'InsurType'=>'人身意外险',
                'InsurCount'=>"50000",
                'InsurEff'=>date('Ymd'),//'保险生效时间',
                'InsurExp'=>date('Ymd'),//'保险到期时间',
                'Flag'=>1,
                'UpdateTime'=>date('YmdHis')
                );
            $list = check_type_float($list);
            $baseinfo = 'baseInfoVehicleInsurance';
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/vehicleinsurance');
            $this->_responseData($res);
        }//ok
        /*
        车辆里程信息
         */
        public function VehicleTotalMile()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
            //CompanyId, Address, VehicleNo, TotalMile, Flag, UpdateTime
                'CompanyId'=>C('companyId'),
                'Address'=>'50000',
                'VehicleNo'=>'阳光保险股份有限公司',
                'TotalMile'=>'500000',
                'Flag'=>1,
                'UpdateTime'=>date('YmdHis'),
            );
            $list = check_type_float($list);
            $baseinfo = 'baseInfoVehicleTotalMile';
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/vehicletotalmile');
            $this->_responseData($res);
        }//ok
        /*
        驾驶员基本信息
         */
        public function driver()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                     //CompanyId, Address, DriverPhone, DriverGender, DriverBirthday, DriverNation, DriverContactAddress, LicenseId, GetDriverLicenseDate, DriverLicenseOn, DriverLicenseOff, TaxiDriver, CertificateNo, NetworkCarIssueOrganization, NetworkCarIssueDate, GetNetworkCarProofDate, NetworkCarProofOn, NetworkCarProofOff, RegisterDate, CommercialType, ContractCompany, ContractOn, ContractOff, State, Flag, UpdateTime
                    'CompanyId'=>C('companyId'),
                    'Address'=>'50000',//见 GB/T 2260
                    'DriverName'=>'李秀君',//null
                    'DriverPhone'=>'15213226934',
                    'DriverGender'=>"男",//见 JT/T 697. 7—2014 中 4.1.2.1.3
                    'DriverBirthday'=>date('Ymd'),
                    'DriverNationality'=>'中华人民共和国',//null
                    'DriverNation'=>'汉族',//见 JT/T 697. 7—2014 中 4.1.2.1. 7
                    'DriverMaritalStatus'=>'已婚',//未婚；已婚;离异,null
                    'DriverLanguageLevel'=>'未知',//null
                    'DriverEducation'=>'未知',//null,见 JT/T 697. 7—2014 中 4.1.2. 1.11
                    'DriverCensus'=>'重庆市派出所',//null
                    'DriverAddress'=>'重庆市渝北区大竹林街道金开大道115号',//null
                    'DriverContactAddress'=>'重庆市渝北区大竹林街道金开大道115号',
                    'PhotoId'=>'00002',//null
                    'LicenseId'=>'513002198101025456',
                    'LicensePhotoId'=>'00004',//nul
                    'DriverType'=>'小客车',//null,jAl JT/T 697. 7—2014 中 5.16
                    'GetDriverLicenseDate'=>date('Ymd'),//'初次领取驾驶证日期',
                    'DriverLicenseOn'=>date('Ymd'),//'驾驶证有效期限起',
                    'DriverLicenseOff'=>date('Ymd'),//'驾驶证有效期限止',
                    'TaxiDriver'=>1,//'是否巡游出租汽车驾驶员',//1是，0：否
                    'CertificateNo'=>'909890903903293',
                    'NetworkCarIssueOrganization'=>'金禄圣科技有限公司',
                    'NetworkCarIssueDate'=>date('Ymd'),//'资格证发证日期',
                    'GetNetworkCarProofDate'=>date('Ymd'),//'初次领取资格证日期',
                    'NetworkCarProofOn'=>date('Ymd'),//'资格证有效起始日期',
                    'NetworkCarProofOff'=>date('Ymd'),//'资格证有效截止日期',
                    'RegisterDate'=>date('Ymd'),//'驾驶员信息向服务所在 地出租汽车行政主管部 门报备曰期',
                    'FullTimeDriver'=>1,//'是否专职驾驶员',//null,1:是0:否
                    'InDriverBlacklist'=>0,//'是否在驾驶员黑名单内',//null
                    'CommercialType'=>0,//'服务类型',//1:网络预约出租汽车2:巡游出租汽车3:私人小客车合乘
                    'ContractCompany'=>'达州亿链商贸有限公司',
                    'ContractOn'=>date('Ymd'),////'合同(或协议)有效期 起',
                    'ContractOff'=>date('Ymd'),//'合同(或协议)有效期 止',
                    'EmergencyContact'=>'徐中会',//null
                    'EmergencyContactPhone'=>'13982859120',//null
                    'EmergencyContactAddress'=>'重庆市渝北区大竹林街道金开大道115号',//null
                    'State'=>0,
                    'Flag'=>1,
                    'UpdateTime'=>date('YmdHis')
                );
             $baseinfo = 'baseInfoDriver';
             $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/driver');
            $this->_responseData($res);
        }//OK
        /*
        驾驶员培训信息
         */
        public function drivereducate()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                    'CompanyId'=>C('companyId'),
                    'Address'=>'50000',//见 GB/T 2260
                    'LicenseId'=>'513002198101025456',
                    'CourseName'=>'《乘车安全规范》',
                    'CourseDate'=>date('Ymd'),//'培训课程曰期',
                    'StartTime'=>date('Ymd'),//'培训开始时间',
                    'StopTime'=>date('Ymd'),//'培训结朿时间',
                    'Duration'=>'2小时',
                    'Flag'=>1,
                    'UpdateTime'=>date('YmdHis')
                );
             $list = check_type_float($list);
            $baseinfo = 'baseInfoDriverEducate';
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/drivereducate');
            $this->_responseData($res);
        }//OK
        /*
        驾驶员移动终端信息
         */
        public function driverapp()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                    'CompanyId'=>C('companyId'),
                    'Address'=>'500000',//见 GB/T 2260
                    'LicenseId'=>'513002198101025456',
                    'DriverPhone'=>'15213226934',
                    'NetType'=>'2',//1:中国联通2:中国移动3:中国电信4:其他
                    'AppVersion'=>'2.1.3',
                    'MapType'=>2,//1:百度地图2:髙德地图3:其他
                    'State'=>1,
                    'Flag'=>1,
                    'UpdateTime'=>date('YmdHis')

                );
            $baseinfo = 'baseInfoDriverApp';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/driverapp');
            $this->_responseData($res);
        }//ok
        /*
        驾驶员统计信息
         */
        public function driverstat()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                
                    'CompanyId'=>C('companyId'),
                    'Address'=>'50000',//见 GB/T 2260
                    'LicenseId'=>'513002198101025456',
                    'Cycle'=>'7',
                    'OrderCount'=>'2',
                    'TrafficViolationCount'=>0,
                    'ComplainedCount'=>0,
                    'Flag'=>1,
                    'UpdateTime'=>date('YmdHis')
                );
            $baseinfo = 'baseInfoDriverStat';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/driverstat');
            $this->_responseData($res);
        }//OK
        /*
        乘客基本信息
         */
        public function passenger()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                
                    'CompanyId'=>C('companyId'),
                    'RegisterDate'=>date('Ymd'),//'注册日期',null
                    'PassengerPhone'=>'18213718760',
                    'PassengerName'=>'徐安乐',//null
                    'PassengerGender'=>'男',//unll
                    'State'=>0,
                    'Flag'=>1,
                    'UpdateTime'=>date('YmdHis')

                );
            $baseinfo = 'baseInfoPassenger';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/baseinfo/passenger');
            $this->_responseData($res);
            
        } //ok
        /*
        订单发起
         */
        
        
        public function orderCreate()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                
                    'CompanyId'=>C('companyId'),
                    'OrderId'=>'B8ADD82D7E2644EE874C171019172946',
                    'Address'=>'500000',//见 GB/T 2260
                    'DepartTime'=>date('YmdHis'),//'预计用车时间',
                    'OrderTime'=>date('YmdHis'),//'订单发起时间',
                    'PassengerNote'=>'很不错，下次继续',//null
                    'Departure'=>'重庆市渝北区大竹林街道金开大道115号',
                    'DepLongitude'=>'106.489381',//'预计出发地点经度',
                    'DepLatitude'=>'29.621679',//'预计出发地点纬度',
                    'Destination'=>'重庆市金佛山国家风景名胜区',
                    'DestLongitude'=>'107.127122',//'预计目的地经度',
                    'DestLatitude'=>'29.049247',//'预计目的地纬度',
                    'Encrypt'=>1,
                    'FareType'=>'2017112206201230'

                );
            $baseinfo = 'orderCreate';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/order/create');
            $this->_responseData($res);

        }//OK
        /*
        订单成功

         */
        public function orderMatch()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(               
                    'CompanyId'=>C('companyId'),
                    'Address'=>'500000',
                    'OrderId'=>'20171025095802559123',
                    'Longitude'=>'107.127392',//'车辆经度',
                    'Latitude'=>'29.049247',//'车辆纬度',
                    'LicenseId'=>'513002198101025456',
                    'DriverPhone'=>'15213226934',
                    'VehicleNo'=>'川SR8889',
                    'DistributeTime'=>date('YmdHis'),//'派单成功时间',
                    'Encrypt'=>1
                );
            $baseinfo = 'orderMatch';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/order/match');
            $this->_responseData($res);
        }//ok
        /*
        订单撤销接口
         */
        public function orderCancel()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                    'CompanyId'=>C('companyId'),
                    'Address'=>'500000',
                    'OrderId'=>'9CE96394F52D468BAE78171025094353',
                    'OrderTime'=>date('YmdHis'),//'订单时间',//null
                    'CancelTime'=>date('YmdHis'),//'订单撤销时间',
                    'Operator'=>"1",//1:乘客2:驾驶员3:平台公司
                    'CancelTypeCode'=>"1",//1:乘客提前撤销2:驾驶员提前撤销3:平台公司撤销4:乘客违约撤销5:驾驶员违约撤销
                    'CancelReason'=>'临时取消行程'//null
                );
            $baseinfo = 'orderCancel';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/order/cancel');
            $this->_responseData($res);
        }//ok
        /*
        车辆经营上线
         */
        public function operateLogin()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                    'CompanyId'=>C('companyId'),
                    'VehicleNo'=>'川SR8889',
                    'LicenseId'=>'513002198101025456',
                    'LoginTime'=>date('YmdHis'),//'车辆经营上线时间',
                    'Longitude'=>'106.489381',//'上线经度',//null
                    'Latitude'=>'29.621679',//'上线纬度',//null
                    'Encrypt'=>1
                );
            $baseinfo = 'operateLogin';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/operate/login');
            $this->_responseData($res);
        } //ok
        /*
        车辆经营下线接口
         */
        public function operateLogout()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                    'CompanyId'=>C('companyId'),
                    'VehicleNo'=>'川SR8889',
                    'LicenseId'=>'513002198101025456',
                    'LogoutTime'=>date('YmdHis'),//'车辆经营下线时间',
                    'Longitude'=>'106.48938',//'下线经度',//null
                    'Latitude'=>'29.621679',//'下线纬度',//null
                    'Encrypt'=>1
                );
            $baseinfo = 'operateLogout';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/operate/logout');
            $this->_responseData($res);
        } //ok
        /*
        经营出发
         */
        public function operateDepart()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                    'CompanyId'=>C('companyId'),
                    'OrderId'=>'DCB834712DCC4A8C9F4C171107173033',
                    'FareType'=>'2017112206201230',
                    'VehicleNo'=>'川SR8889',
                    'LicenseId'=>'513002198101025456',
                    'DepLongitude'=>'106.48641',//'车辆出发经度',
                    'DepLatitude'=>'29.61393',//'车辆出发纬度',
                    'DepTime'=>date('YmdHis'),//'上车时间',
                    'WaitMile'=>'100',//'空驶里程',//null
                    'WaitTime'=>1*60*60,//'等待时间',//null
                    'Encrypt'=>1

                );
            $baseinfo = 'operateDepart';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/operate/depart');
            $this->_responseData($res);
        }//OK
        
        /*
        经营到达
         */
        public function operateArrive()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(               
                'CompanyId'=>C('companyId'),
                'OrderId'=>'DCB834712DCC4A8C9F4C171107173033',
                'DestLongitude'=>'106.49117',//'车辆到达经度',
                'DestLatitude'=>'29.56944',//'车辆到达纬度',
                'Encrypt'=>1,//'坐标加密标识',
                'DestTime'=>date('YmdHis'),//'下车时间',
                'DriveMile'=>250,//'载客里程',
                'DriveTime'=>2*60*60//'载客时间'
                );
            $baseinfo = 'operateArrive';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/operate/arrive');
            $this->_responseData($res);
        }//ok
        /*
        经营支付信息
         */
        public function operatePay()
        {
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(              
                    'CompanyId'=>C('companyId'),
                    'OrderId'=>'8232C46113C549B19D77171025100714',
                    'OnArea'=>'500000',
                    'DriverName'=>'李秀君',//null
                    'LicenseId'=>'513002198101025456',
                    'FareType'=>'2017112206201230',
                    'VehicleNo'=>'川SR8889',
                    'BookDepTime'=>date('YmdHis',time()-15*60),//'预计上车时间',
                    'WaitTime'=>0.5*60*60,//'等待时间',//null
                    'DepLongitude'=>'106.48641',//'车辆出发经度',
                    'DepLatitude'=>'29.61393',//'车辆出发纬度',
                    'DepArea'=>'重庆市渝北区大竹林街道黄山大道中段105号',//null
                    'DepTime'=>date('YmdHis'),//'上车时间',
                    'DestLongitude'=>'106.49117',//'车辆到达经度',
                    'DestLatitude'=>'29.56944',//'车辆到达纬度',
                    'DestArea'=>'重庆市江北大石坝(公交站)',//null
                    'DestTime'=>date('YmdHis',time()+1.5*60*60),//'下车时间',
                    'BookModel'=>'预定车型',//null
                    'Model'=>'实际使用车型',//null
                    'DriveMile'=>100.5,//'载客里程',
                    'DriveTime'=>1.6*60*60,//'载客时间',
                    'WaitMile'=>10.3,//'空驶里程',//null
                    'FactPrice'=>56,//'实收金额',
                    'Price'=>56,//'应收金额',//null
                    'CashPrice'=>0,//'现金支付金额',//null
                    'LineName'=>'alipay',//'电子支付机构',//null
                    'LinePrice'=>56,//'电子支付金额',//null
                    // 'PosName'=>'POS机支付机构',//null
                    // 'PosPrice'=>'POS机支付金额',//null
                    // 'BenfitPrice'=>'优惠金额',//null
                    // 'BookTip'=>'预约服务费',//null
                    // 'PassengerTip'=>'附加费',//null
                    // 'PeakUpPrice'=>'髙峰时段时间加价金 额',//null
                    // 'NightUpPrice'=>'夜间时段里程加价金 额',//null
                    'FarUpPrice'=>0,//'远途加价金额',
                    'OtherUpPrice'=>0,//'其他加价金额',
                    'PayState'=>"1",//'结算状态',//0:未结算1:已结算2:未知
                    'PayTime'=>date('YmdHis'),//'乘客结算时间',//null
                    'OrderMatchTime'=>date('YmdHis',time()+1.5*60*60),//'订单完成时间',//null
                    'InvoiceStatus'=>"0"//'发票状态'//0:未开票1:已开票2:未知
                );
            $baseinfo = 'operatePay';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/operate/pay');
            $this->_responseData($res);

        }//ok
        /*
        驾驶员定位信息
         */
        public function positionDriver(){
            $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
            $list = array(
                'CompanyId'=>C('companyId'),
                'LicenseId'=>'513002198101025456',
                'DriverRegionCode'=>'50000',
                'VehicleNo'=>'川SR8889',
                'PositionTime'=>time(),//'定位时间',
                'Longitude'=>'106.48641',//'经度',
                'Latitude'=>'29.61393',//'纬度',
                'Encrypt'=>1,//'坐标加密标识',//null
                'Direction'=>0,//'方向角',//null
                'Elevation'=>1500,//'海拔髙度',//null
                'Speed'=>10,//'瞬时速度',//null
                'BizStatus'=>1,//'营运状态',//null,1:载客2:接单3:空驶4:停运
                'OrderId'=>'4B42B823876E49E7A0B8171107173136'
                );
            $baseinfo = 'positionDriver';
            $list = check_type_float($list);
            $res = PostController::CurlPostData($list,$baseinfo,'/position/driver');
            $this->_responseData($res);
        }//ok
        /**
     * A. 7.2.车辆定位信息接口
     * 业务描述:用于网约车平台公司向部级平台发起请求，上传车辆定位信息。
     */
    public function positionVehicle()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'VehicleNo' => '川SR8889',
            'VehicleRegionCode' => "500000",//'车辆报备地行政区划代行政区划代码，地市级，应符合GB/T2260',
            'PositionTime' => time(),//'定位时间unixtime',
            'Longitude' =>'106.48641',//'经度单位：1*10-6度',
            'Latitude' => '29.61393',//'纬度单位：1*10-6度',
            // 'Speed' => 100,//'瞬时速度    里每小时',//null
            // 'Direction' => '方向角    0 — 359,顺时针方向',//null
            // 'Elevation' => '海拔髙度    单位:米',//null
            // 'Mileage' => '行驶里程    单位:km',//null
            'Encrypt' => 1,//'l:GCJ_〇2测绘局标准 2:WGS84 GPS 标准  3:BD—09百度标准 4:CGCS2000北斗标准 〇:其他 ',//null
            //'WarnStatus' => ,//'预警状态    参考JT/T808',//null，参考 JT/T808
            //'VehStatus' => '车辆状态    参考;JT/T808',//null，参考;JT/T808
            'BizStatus' => 1,//'营运状态 1载客 2接单 3空驶 4停运 ', //null
            'OrderId' => '4B42B823876E49E7A0B8171107173136'

        );
        $baseinfo = 'positionVehicle';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/position/vehicle');
        $this->_responseData($res);
    }//ok
    /**
     * 8.1用于网约车平台公司向部级平台发起请求，上传乘 客评价信息。
     */
    public function ratedPassenger()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'OrderId' => '4B42B823876E49E7A0B8171107173136',
            'EvaluateTime' => date('YmdHis'),//'评价时间 YYYYMMDDhhmmss',
            'ServiceScore' =>(int) 4.5,//'服务满意度    五分制',
            'DriverScore' =>(int) 5,//'驾驶员满意度    五分制',
            'VehicleScore' =>(int) 4,//'车辆满意度    五分制',
            'Detail' => '司机很热心，人很好',//null
        );
        $baseinfo = 'ratedPassenger';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/rated/passenger');
        $this->_responseData($res);

    }//ok
    /**
     * 乘客投诉信息接口
     * @return [type] [description]
     */
    public function ratedPassengerComplaint()
    {
         $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'OrderId' => '4B42B823876E49E7A0B8171107173136',
            'ComplaintTime' => date('YmdHis'),//'投诉时间 YYYYMMDDhhmmss',
            'Detail' => '司机路上打电话',
            'Result' => '警告司机',
            );
        $baseinfo = 'ratedPassengerComplaint';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/rated/passengercomplaint');
        $this->_responseData($res);
    }//OK
     /**
     * 8.3用于网约车平台公司向部级平台发起请求，上传驾 驶员处罚信息
     */
    public function ratedDriverPunish()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'LicenseId' => '513002198101025456',
            'PunishTime' => date('YmdHis'),//'处罚时间   YYYYMMDDhhmmss',
            'PunishReason' => '驾车行程中打电话',//null
            'PunishResult' => '予以警告处分'

        );
        $baseinfo = 'ratedDriverPunish';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/rated/driverpunish');
        $this->_responseData($res);

    }//OK
     /**
     * 8. 4用于网约车平台公司向部级平台发起请求，上传驾驶员信誉信息。
     */
    public function ratedDriver()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'LicenseId' => '513002198101025456',
            'Level' => (int)5,//' 服务质量信誉等级    五分制',
            'TestDate' => date('Ymd'),//'服务质量信誉考核曰 期    YYYYMMDD',
            'TestDepartment' => '金禄圣科技有限公司'

        );
        $baseinfo = 'ratedDriver';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/rated/driver');
        $this->_responseData($res);
    }//ok
/**
     * 9.1用于私人小客车合乘信息服务平台向部级平台发 起请求，更新私人小客车合乘信息服务平台信息
     */
    public function shareCompany()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'CompanyName' => '重庆金禄圣科技有限公司',
            'Identifier' => '91500000MA5UAJH16G',
            'Address' => "500000",//'注册地行政区划代码GB/T 2260',
            'ContactAddress' => '重庆市渝北区金开大道互联网产业园13栋二楼',
            'EconomicType' => '150 ',//见 JT/T415—2006 中 5.1.8规定 
            'LegalName' => '项志峭',
            'LegalPhone' => '13527391981',
            'State' => 0,//' 0:有效 1:失效',
            'Flag' => 1,//' 1:新增 2:更新 3:删除',
            'UpdateTime' => date('YmdHis'),//'更新时间    私人小客车合乘信息服务 平台完成数据更新的时间 YYYYMMDDhhmmss'
        );
        $baseinfo = 'shareCompany';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/share/company');
        $this->_responseData($res);
    }//OK
     /**
     *9.2私人小客车合乘驾驶员行程发布接口定义
     */
    public function shareRoute()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'Address' => '50000',//null
            'RouteId' => '20171109142440180255',
            'OrderId' => '20171107171625290655',
            'DriverName' => '李秀君',
            'DriverPhone' => '15213226934',
            'LicenseId' => '513002198101025456',
            'VehicleNo' => '川SR8889',
            'Departure' => '重庆市渝北区金开大道115号靠近重庆易宠科技有限公司',
            'DepLongitude' => '106.489353',//'车辆出发经度',
            'DepLatitude' => '29.621703',//'车辆出发纬度',
            'Destination' => '重庆市重庆市人民大礼堂',
            'DestLongitude' => '106.553841',//'到达地经度',
            'DestLatitude' => '29.561555',//'到达地炜度',
            'Encrypt' => 1,//'坐标加密标识    1:GCJ—02测绘局标准 2:WGS84 GPS 标准 3:BD—09百度标准 4:CGCS2000北斗标准 〇:其他',
            'RouteCreateTime' => date('YmdHis'),//'行程发布时间    YYYYMMDDhhmmss',
            'RouteMile' => 100,//'程预计里程    单位:km',//null
            'RouteNote' => '尽快完成'  //null
        );
        $baseinfo = 'shareRoute';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/share/route');
        $this->_responseData($res);
    }//ok
    /**
     * 9.3业务描述:用于私人小客车合乘信息服务平台向部级平台发 起请求，上传私人小客车合乘订单信息。
     */


    public function shareOrder()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            'CompanyId' => C('CompanyId'),
            'Address' => '50000',//null
            'RouteId' => '20171109142440180255',
            'OrderId' => '20171107171625290655',
            'BookDepartTime' => date('YmdHis'),//'预计上车时间',
            'Departure' => '重庆市渝北区大竹林街道金开大道115号',
            'DepLongitude' => '106.48936',//'预计上车地点经度',
            'DepLatitude' => '29.6217',//'预计上车地点纬度',
            'Destination' => '重庆市重庆市人民大礼堂',
            'DestLongitude' => '106.55384',//'预计下车地点经度',
            'DestLatitude' => '29.56155',//'预计下车地点纬度',
            'Encrypt' => 1,//'坐标加密标识    1:GCJ —02测绘局标准 2:WGS84 GPS 标准 3:BD—09百度标准 4:CGCS2000北斗标准 0:其他',
            'OrderEnsureTime' => date('YmdHis'),//'订单确认时间',
            'PassengerNum' => 2,//'乘客人数',
            'PassengerNote' => '有小孩', //null

        );
        $baseinfo = 'shareOrder';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/share/order');
        $this->_responseData($res);
    }//ok
    /**
     * A. 9.4.私人小客车合乘订单支付接口
     * 业务描述:用于私人小客车合乘信息服务平台向部级平台发 起请求，上传私人小客车合乘乘客订单支付信息。
     */
    public function sharePay()
    {
        $list = $this->params;
            // if(empty($list)){
            //     $this->_responseData(['errCode'=>40006,'msg'=>'参数缺失']);
            // }
        $list = array(
            // FactPrice, Price, CashPrice, LinePrice, PayState, PassengerNum
                'CompanyId' => C('CompanyId'),
                'Address' => '500000',//null
                'RouteId' => '20171109142440180255',
                'OrderId' => '20171107171625290655',
                'DriverPhone' => '15213226934',
                'LicenseId' => '513002198101025456',
                'VehicleNo' => '川SR8889',
                'FareType' => '2017112206201230',
                'BookDepartTime' => date('YmdHis'),//'预计上车时间',
                'DepartTime' => date('YmdHis'),//'实际上车时间',
                'Departure' => '上车地点',
                'DepLongitude' => '106.48936',//'上车地点经度',
                'DepLatitude' => '29.6217',//'上车地点纬度',
                'DestTime' => date('YmdHis'),//'下车时间',
                'Destination' => '重庆市重庆市人民大礼堂',
                'DestLongitude' => '106.55384',//'下车地点经度',
                'DestLatitude' => '29.56155',//'下车地点纬度',
                'Encrypt' => 1,//'坐标加密标识1:GCJ—〇2测绘局标准 2:WGS84 GPS 标准 3:BD—09百度标准 4:CGCS2000北斗标准 〇:其他',
                'DriveMile' => 100,//'载客里程',
                'DriveTime' => 1*60*60,//'载客时间',
                'LineName'=>'',//NULL
                'BenfitPrice'=>0,//NULL
                'ShareFuelFee'=>0,//NULL
                'ShareHightwayToll'=>0,//NULL
                'FactPrice'=>100,
                'Price'=>100, 
                'CashPrice'=>0,
                'LinePrice'=>100,
                'PayState'=>"1",
                'PassengerNum'=>1
            );
        $baseinfo = 'sharePay';
        $list = check_type_float($list);
        $res = PostController::CurlPostData($list,$baseinfo,'/share/pay');
        $this->_responseData($res);
    }

}